var t = require("../../../@babel/runtime/helpers/toConsumableArray");

require("../../../@babel/runtime/helpers/Arrayincludes");

var o = getApp(), a = require("../../../wxParse/wxParse.js"), e = !0, i = 1;

Component({
    properties: {
        prop_goods_info: {
            type: null
        },
        producerId: {
            type: Number
        },
        goodsId: {
            type: Number
        },
        goodsType: {
            type: String
        },
        mark: {
            type: String
        },
        hoet: {
            type: null
        },
        datop: {
            type: null
        },
        markId: {
            type: null
        },
        showIn: {
            type: null
        },
        vieText: {
            type: null
        },
        boxHeight: {
            type: Number
        },
        xqBoxShow: {
            type: null
        },
        ipnonexbol: {
            type: null
        },
        activityid: {
            type: null
        },
        fromStock: {
            type: String || Number
        },
        enterAt: {
            type: Object
        },
        store_id: {
            type: null
        },
        fight_groups: {
            type: null
        },
        mode: {
            type: null
        },
        coid: {
            type: null
        },
        debtId: {
            type: null
        },
        cid: {
            type: null
        }
    },
    data: {
        goods_plugin: {},
        goods_info: {},
        goodsInfo: "",
        gooddatas: "",
        is_market: !1,
        marketShow: "",
        getMarketPrice: "",
        getprice: "",
        language: "",
        imagUrl: "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/",
        showCs: !1,
        current: 1,
        popupModeshow: !0,
        isBuy: !1,
        isTime: !1,
        beginTime: 0,
        endTime: 0,
        countDownObj: {
            day: "00",
            hou: "00",
            min: "00",
            sec: "00"
        },
        isGoodsLove: !1,
        goods_love_cash: 0,
        goods_love_deduction: 0,
        goods_love_name: "",
        isRent: !1,
        isRight: !1,
        isRentBuyShow: !1,
        isGoods: !1,
        SUBMIT_ACTION_CART: "-1",
        SUBMIT_ACTION_BUY: "-2",
        submitActionTag: "",
        optionsId: "",
        popupSpecs: !1,
        goodsCount: 1,
        optionsMaxCount: 1,
        popupSpecs2: !1,
        popThumb: "",
        popStock: 0,
        popPrice: 0,
        specsManage: [],
        goodsDescription: "",
        is_o2o: !1,
        favorite: !1,
        isAddCart: !1,
        activeName: 0,
        currentTabIndex: "0",
        first_content: "",
        second_content: "",
        third_content: [],
        is_first_content: !1,
        is_second_content: !1,
        is_third_content: !1,
        commentPage: 1,
        noMoreComment: !1,
        posterShow: !1,
        posterImg: "",
        timestart: 0,
        timeend: 0,
        isBegTime: !1,
        begTimeStr: "",
        beginDownObj: {
            day: "00",
            hou: "00",
            min: "00",
            sec: "00"
        },
        replyBol: !1,
        get_guidepage_info: {},
        isLoadMore: !0,
        page: 1,
        total_page: 0,
        roomdataBol: !1,
        roomdata: [],
        min_micro: [],
        tabList: [],
        customer_open: !0,
        show1: !1,
        iPnoneBottomBol: !1,
        skuImages: [],
        showSkuImages: !1,
        activeSkuIndex: 0,
        activeSkuIndex_1: null,
        activeSkuIndex_2: null,
        luck_draw: {},
        btnData: {
            over_top: 500,
            icon_url: "https://www.yunzmall.com//min_img/icon-fontclass-zhiding.png"
        },
        btnData2: {
            over_top: 450,
            icon_url: "https://www.yunzmall.com//min_img/bc_eweima.png"
        },
        showMoreParams: !1,
        showSahre: !1,
        wechatcircle_open: 0,
        freight_pricing: {},
        freightPricing_main_heigth: null,
        freightPricing_main_heigth_var: null,
        isfold: !1,
        nocart: !1,
        broadcast_data: [],
        selfbuy_discount: null,
        wx_video_link: 0,
        showVideoLink: !1,
        article_url: null,
        integral: "积分",
        isTimeEnd: !1,
        ispt: !1,
        cart_num: "",
        MachineId: "",
        is_member_enter: !0,
        lawyerInfo: {
            name: "",
            price: "",
            status: "",
            service_day: "",
            service_type: "",
            l_id: "",
            l_name: "",
            lf_id: "",
            lf_name: "",
            lf_province_name: "",
            lf_city_name: "",
            lf_area_name: "",
            lf_street_name: "",
            lf_address_detail: ""
        }
    },
    observers: {
        prop_goods_info: function(t) {
            this.setData({
                is_member_enter: !(!t.get_goods || 1 != t.get_goods.is_member_enter)
            });
        },
        datop: function(t) {
            t >= this.data.xqtop ? this.setData({
                current: 3
            }) : t >= this.data.pjtop ? this.setData({
                current: 2
            }) : this.setData({
                current: 1
            });
        }
    },
    lifetimes: {
        attached: function(t) {
            var a = this;
            this.setData({
                ispt: !![ "grabGroup", "group_goods", "zhpGroup", "groupwork", "ywmGroup" ].includes(this.data.goodsType) && this.data.goodsType
            }), this.properties.activityid && this.setData({
                activityId: this.properties.activityid
            }), "zhpGroup" == this.data.goodsType && this.setData({
                activityId: this.properties.goodsId
            }), e = !0, this.getiPnoneBottom();
            var i = wx.getStorageSync("langIndex");
            if (this.setData({
                language: i.en,
                cart_num: o.globalData.cart_num
            }), this.init(), this.data.producerId && this.getManage(), !this.data.producerId) {
                var s = new Map([ [ "group_goods", "groupGetData" ], [ "ywmGroup", "groupGetData" ], [ "grabGroup", "grabGroupData" ], [ "retailGood", "retailPage" ], [ "zhpGroup", "zhpGroupData" ], [ "groupwork", "groupWorkData" ] ]), n = s.has(this.data.goodsType) ? s.get(this.data.goodsType) : "getGoodsPage";
                "group_goods" != this.data.goodsType && "ywmGroup" != this.data.goodsType || (this.setData({
                    activityid: this.properties.goodsId,
                    goodsInfo: {}
                }), this.data.specsManage = [], this.getCommentData()), this[n]();
            }
            "vending_machine" == this.data.mark && this.setData({
                MachineId: this.data.markId
            });
            var d = this.selectComponent("#footChild");
            1 != this.data.fromStock && 2 != this.data.fromStock || d.setData({
                nocart: !0
            }), wx.createSelectorQuery().in(this).select(".goodsdetail").boundingClientRect().exec(function() {
                var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
                t[0].height < wx.getSystemInfoSync().windowHeight && a.setData({
                    xqBoxShow: !0
                });
            });
        },
        detached: function() {},
        ready: function() {
            var t = this, o = wx.getStorageSync("yz_basic_info").lang.goods && wx.getStorageSync("yz_basic_info").lang.goods.price ? wx.getStorageSync("yz_basic_info").lang.goods.price : "现价", a = wx.getStorageSync("yz_basic_info").lang.goods && wx.getStorageSync("yz_basic_info").lang.goods.market_price ? wx.getStorageSync("yz_basic_info").lang.goods.market_price : "原价";
            t.setData({
                getMarketPrice: a,
                getprice: o
            }), this.createSelectorQuery().select(".sift").boundingClientRect(function(o) {
                t.setData({
                    pjtop: o.top - 80
                });
            }).exec(), this.createSelectorQuery().select(".foShowBox").boundingClientRect(function(o) {
                t.setData({
                    xqtop: o.top - 100
                });
            }).exec();
            var e = wx.getStorageSync("integral");
            e && this.setData({
                integral: e
            });
        }
    },
    methods: {
        contorBuyNow: function() {
            "goods" != this.data.goodsType && "supplierGoods" != this.data.goodsType || this.selectComponent("#footChild").buyNow("design");
        },
        getOptionsId: function(t) {
            if (console.log("deeeeeeeeeeeeee"), "goods" == this.data.goodsType || "supplierGoods" == this.data.goodsType) {
                for (var o = this.data.gooddatas.get_goods.has_many_options, a = this.selectComponent("#Tag"), e = "", i = 0; i < o.length; i++) t.detail.option == o[i].id && (e = o[i].title);
                if (a.setData({
                    "optionObj.title": e,
                    "optionObj.total": t.detail.goodsCount
                }), this.data.goods_plugin && this.data.goods_plugin.goods_stock_judgment) {
                    var s = this.selectComponent("#adop");
                    s.setData({
                        judgmentOptionId: t.detail.option
                    }), s.getData();
                }
            }
        },
        childAdressStateMethod: function(t) {
            console.log(t, "childAdressStateMethod");
            var o = t.detail;
            this.selectComponent("#footChild").childAdressPost(o);
        },
        gotoLuckDraw: function() {
            wx.navigateTo({
                url: "/packageH/newDraw/luckyDraw/luckyDraw"
            });
        },
        changeCartNumber: function() {
            this.setData({
                cart_num: o.globalData.cart_num
            });
        },
        openShare: function() {
            this.setData({
                showSahre: !0
            });
        },
        closeSharePop: function() {
            this.setData({
                showSahre: !1
            });
        },
        onFavorite: function(t) {
            this.data.favorite ? this.removeFavorite() : this.addFavorite();
        },
        removeFavorite: function() {
            var t = this, a = o.getNetAddresss("member.member-favorite.destroy");
            a += "&goods_id=" + this.data.goodsId, o._getNetWork({
                url: a,
                success: function(o) {
                    var a = o.data;
                    1 == a.result && (t.setData({
                        favorite: !1
                    }), wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 3e3
                    }));
                },
                fail: function(t) {
                    console.log(t);
                }
            });
        },
        addFavorite: function() {
            var t = this, a = o.getNetAddresss("member.member-favorite.store");
            a += "&goods_id=" + this.data.goodsId, o._getNetWork({
                url: a,
                success: function(o) {
                    var a = o.data;
                    1 == a.result && (t.setData({
                        favorite: !0
                    }), wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 3e3
                    }));
                },
                fail: function(t) {
                    console.log(t);
                }
            });
        },
        shareGoods: function() {
            var t = this, a = o.getNetAddresss("plugin.wechatcircle_products.api.import.import"), i = {
                product_list: [ {
                    item_code: t.data.goodsInfo.id,
                    title: t.data.goodsInfo.title,
                    desc: t.data.goodsInfo.title,
                    category_list: [ "商品" ],
                    image_list: t.data.goodsInfo.thumb_url,
                    src_wxapp_path: "packageA/detail_v2/detail_v2?id=" + t.data.goodsInfo.id,
                    sku_list: [ {
                        sku_id: t.data.goodsInfo.id,
                        price: t.data.goodsInfo.price,
                        original_price: t.data.goodsInfo.market_price,
                        status: 1
                    } ]
                } ]
            };
            e && (e = !1, o._postNetWork({
                url: a,
                data: i,
                success: function(o) {
                    var a = o.data;
                    1 == a.result ? (setTimeout(function() {
                        e = !0;
                    }, 1e3), wx.openBusinessView ? wx.openBusinessView({
                        businessType: "friendGoodsRecommend",
                        extraData: {
                            product: {
                                item_code: t.data.goodsInfo.id,
                                title: t.data.goodsInfo.title,
                                image_list: t.data.goodsInfo.thumb_url
                            }
                        },
                        success: function(o) {
                            t.setData({
                                showSahre: !1
                            });
                        },
                        fail: function(o) {
                            console.log("fail", o), t.setData({
                                showSahre: !1
                            });
                        }
                    }) : wx.showToast({
                        title: "微信7.0.3及以上版本支持 请先更新微信版本",
                        icon: "none",
                        duration: 3e3
                    })) : wx.showToast({
                        title: a.msg,
                        icon: "none",
                        duration: 3e3
                    });
                },
                fail: function(t) {
                    setTimeout(function() {
                        e = !0;
                    }, 1e3), console.log(t);
                }
            }));
        },
        getiPnoneBottom: function() {
            wx.getStorageSync("iPhoneBottom") && this.setData({
                iPnoneBottomBol: !0
            });
        },
        init: function() {
            this.setData({
                wechatcircle_open: 0,
                customer_open: !0,
                show1: !1,
                service_QRcode: "",
                service_mobile: ""
            });
        },
        callPhone: function() {
            wx.makePhoneCall({
                phoneNumber: this.data.service_mobile
            });
        },
        closePop: function() {
            this.setData({
                show1: !1
            });
        },
        handleContact: function(t) {
            console.log(t.detail);
        },
        appendBtn: function() {
            this.setData({
                replyBol: !0
            });
        },
        replyBolClose: function() {
            this.setData({
                replyBol: !1,
                kefu: !1
            });
        },
        toGroupCode: function() {
            "home" === this.data.goods_plugin.group_code.jump_mode ? wx.reLaunch({
                url: "/packageE/groupCode/groupCode"
            }) : this.data.goods_plugin.group_code.code_mini_url && wx.navigateTo({
                url: this.data.goods_plugin.group_code.code_mini_url
            });
        },
        handlerShowParams: function() {
            this.setData({
                showMoreParams: !this.data.showMoreParams
            });
        },
        showCan: function(t) {
            this.setData({
                popupModeshow: t.detail
            });
        },
        getTap: function(t) {
            var o = t.currentTarget.id;
            this.setData({
                current: o
            }), 1 == o ? wx.pageScrollTo({
                scrollTop: 0,
                duration: 300
            }) : 2 == o ? wx.pageScrollTo({
                scrollTop: this.data.pjtop,
                duration: 300
            }) : 3 == o ? (this.setData({
                xqBoxShow: !0
            }), wx.pageScrollTo({
                scrollTop: this.data.xqtop + 400,
                duration: 300
            })) : 4 == o && (this.setData({
                xqBoxShow: !0
            }), this.createSelectorQuery().select(".goodsdetail").boundingClientRect(function(t) {
                wx.pageScrollTo({
                    scrollTop: t.height,
                    duration: 300
                });
            }).exec());
        },
        _timeCompare: function(t) {
            var o = new Date(1e3 * parseInt(t)), a = new Date();
            console.log(o >= a), a >= o ? (this.setData({
                isTime: !0
            }), this._countDown()) : (this.setData({
                isTime: !1,
                isBegTime: !0,
                isTimeEnd: !1,
                begTimeStr: 1e3 * t
            }), this.beginDown());
        },
        _countDown: function() {
            var t = new Date().getTime(), o = this.data.endTime, a = null;
            if (o - t > 0) {
                var e = (o - t) / 1e3, i = parseInt(e / 86400), s = parseInt(e % 86400 / 3600), n = parseInt(e % 86400 % 3600 / 60), d = parseInt(e % 86400 % 3600 % 60);
                a = {
                    day: this._timeFormat(i),
                    hou: this._timeFormat(s),
                    min: this._timeFormat(n),
                    sec: this._timeFormat(d)
                };
            } else a = {
                day: "00",
                hou: "00",
                min: "00",
                sec: "00"
            };
            this.setData({
                countDownObj: a
            }), o - t < 0 ? this.setData({
                countDownObj: {
                    day: "00",
                    hou: "00",
                    min: "00",
                    sec: "00"
                },
                isTimeEnd: !0
            }) : setTimeout(this._countDown.bind(this), 1e3);
        },
        beginDown: function() {
            var t = new Date().getTime(), o = this.data.begTimeStr, a = null;
            if (o - t > 0) {
                var e = (o - t) / 1e3, i = parseInt(e / 86400), s = parseInt(e % 86400 / 3600), n = parseInt(e % 86400 % 3600 / 60), d = parseInt(e % 86400 % 3600 % 60);
                a = {
                    day: this._timeFormat(i),
                    hou: this._timeFormat(s),
                    min: this._timeFormat(n),
                    sec: this._timeFormat(d)
                };
            } else this.setData({
                isTime: !0,
                isBegTime: !1,
                isTimeEnd: !0
            }), a = {
                day: "00",
                hou: "00",
                min: "00",
                sec: "00"
            };
            this.setData({
                beginDownObj: a
            }), o - t < 0 ? (this.setData({
                isTime: !0,
                isBegTime: !1,
                isTimeEnd: !0
            }), this.setData({
                beginDownObj: {
                    day: "00",
                    hou: "00",
                    min: "00",
                    sec: "00"
                }
            })) : setTimeout(this.beginDown.bind(this), 1e3);
        },
        _timeFormat: function(t) {
            return t < 10 ? "0" + t : t;
        },
        toBrandDetail: function(t) {
            var o = t.currentTarget.dataset.brandval;
            wx.navigateTo({
                url: "/packageB/member/goods/GoodsBrand/GoodsBrand?id=" + o
            });
        },
        addCart: function(t) {
            this.selectComponent("#buyNowChild").setData({
                popupSpecs: t.detail.popupSpecs,
                popupSpecs2: t.detail.popupSpecs2,
                submitActionTag: t.detail.submitActionTag
            }), !t.detail.popupModeshow && t.detail.popupModeshow || this.setData({
                popupModeshow: t.detail.popupModeshow
            }), !t.detail.popupSpecs && t.detail.popupSpecs || this.setData({
                popupSpecs: t.detail.popupSpecs
            });
        },
        buyNow: function() {
            this.selectComponent("#footChild").buyNow();
        },
        buyNowRetail: function(t) {
            this.selectComponent("#buyNowChild").setData({
                popupSpecs: t.detail.popupSpecs,
                popupSpecs2: t.detail.popupSpecs2,
                submitActionTag: t.detail.submitActionTag,
                isAward: t.detail.isAward ? t.detail.isAward : "",
                buyType: t.detail.buyType
            }), !t.detail.popupModeshow && t.detail.popupModeshow || this.setData({
                popupModeshow: t.detail.popupModeshow
            });
        },
        buyNowFoot: function(t) {
            !1 !== this.data.gooddatas.join_status || "group_goods" !== this.data.goodsType && "ywmGroup" !== this.data.goodsType ? (this.selectComponent("#buyNowChild").setData({
                popupSpecs: t.detail.popupSpecs,
                popupSpecs2: t.detail.popupSpecs2,
                submitActionTag: t.detail.submitActionTag,
                isAward: t.detail.isAward ? t.detail.isAward : "",
                submitTag: t.detail.submitTag
            }), !t.detail.popupModeshow && t.detail.popupModeshow || this.setData({
                popupModeshow: t.detail.popupModeshow
            })) : wx.showToast({
                title: "今日该活动已达到参与次数",
                icon: "none",
                duration: 3e3
            });
        },
        initPopView: function() {
            var t = this, o = this.selectComponent("#buyNowChild");
            if ("group_goods" == this.data.goodsType || "zhpGroup" == this.data.goodsType || "ywmGroup" == this.data.goodsType) if (o.setData({
                popPrice: this.data.gooddatas.min_price + "起"
            }), 1 == this.data.goodsInfo.has_option) {
                this.setData({
                    popStock: this.data.gooddatas.stock,
                    goodsDescription: "选择"
                });
                var a = [];
                this.data.goodsInfo.has_many_options.forEach(function(o, e) {
                    var i = o.thumb ? o.thumb : t.data.goodsInfo.thumb;
                    a.push(i);
                }), o.setData({
                    popStock: this.data.popStock,
                    goodsDescription: "选择",
                    skuImages: a
                });
            } else {
                var e = [];
                e.push(this.data.goodsInfo.thumb), i = "group_goods" == this.data.goodsType || "ywmGroup" == this.data.goodsType ? 0 == this.data.gooddatas.has_many_options[0].buy_limit ? this.data.gooddatas.has_many_options[0].stock : this.data.gooddatas.has_many_options[0].buy_limit : this.data.gooddatas.has_many_options[0].stock, 
                this.setData({
                    popStock: this.data.gooddatas.stock,
                    groupStock: this.data.gooddatas.has_many_options[0].stock,
                    skuImages: e,
                    optionsMaxCount: i
                }), o.setData({
                    popStock: this.data.popStock,
                    groupStock: this.data.gooddatas.has_many_options[0].stock,
                    skuImages: e
                });
            } else if ("grabGroup" == this.data.goodsType) {
                try {
                    this.setData({
                        "gooddatas.has_option": this.data.gooddatas.has_many_specs.length > 0 ? 1 : 0
                    });
                } catch (t) {
                    this.setData({
                        "gooddatas.has_option": 0
                    });
                }
                var s = [];
                if (this.data.gooddatas.has_many_options.forEach(function(o, a) {
                    var e = null != o.thumb ? o.thumb : t.data.gooddatas.thumb;
                    s.push(e);
                }), this.setData({
                    _optionArr: s
                }), 1 == this.data.gooddatas.has_option) {
                    this.setData({
                        popPrice: this.data.gooddatas.min_price + "-" + this.data.gooddatas.max_price,
                        popThumb: this.data.gooddatas.thumb,
                        popStock: this.data.gooddatas.stock,
                        goodsDescription: "选择"
                    });
                    for (var n = 0; n < this.data.gooddatas.has_many_specs.length; n++) this.setData({
                        goodsDescription: this.data.goodsDescription + " " + this.data.gooddatas.has_many_specs[n].title
                    });
                } else this.setData({
                    popThumb: this.data.gooddatas.thumb,
                    popStock: this.data.gooddatas.stock,
                    popPrice: this.data.gooddatas.price,
                    goodsDescription: "",
                    optionsMaxCount: this.data.gooddatas.stock
                });
            } else {
                var d = "";
                if (1 == this.data.goodsInfo.has_option) {
                    d = this.data.goods_plugin.point_goods ? this.data.goods_plugin.point_goods.min_point + "-" + this.data.goods_plugin.point_goods.max_point : this.data.goodsInfo.min_price + "-" + this.data.goodsInfo.max_price;
                    for (var r = 0; r < this.data.goodsInfo.has_many_specs.length; r++) this.setData({
                        goodsDescription: this.data.goodsDescription + " " + this.data.goodsInfo.has_many_specs[r].title
                    });
                    var c = [];
                    this.data.goodsInfo.has_many_options.forEach(function(o, a) {
                        var e = "" != o.thumb ? o.thumb : t.data.goodsInfo.thumb;
                        c.push(e);
                    }), o.setData({
                        popStock: this.data.goodsInfo.stock,
                        popThumb: this.data.goodsInfo.thumb,
                        popPrice: d,
                        goodsDescription: "选择",
                        optionsMaxCount: this.data.goodsInfo.stock,
                        skuImages: c
                    });
                } else {
                    var g = [];
                    g.push(this.data.goodsInfo.thumb), d = this.data.goods_plugin.point_goods ? this.data.goods_plugin.point_goods.point : this.data.goodsInfo.price, 
                    o.setData({
                        popStock: this.data.goodsInfo.stock,
                        popThumb: this.data.goodsInfo.thumb,
                        popPrice: d,
                        goodsDescription: "",
                        optionsMaxCount: this.data.goodsInfo.stock,
                        skuImages: g,
                        goodsCount: this.data.goodsInfo.min_buy_num
                    });
                }
            }
        },
        showSkuImages_Methob_child: function(t) {
            this.setData({
                popupModeshow: t.detail
            });
        },
        toRentBuy: function(t) {
            var o = t.currentTarget.dataset.immedid;
            wx.navigateTo({
                url: "/packageA/detail_v2/detail_v2?id=" + o
            });
        },
        setDataByTabIndex: function() {
            "0" != this.data.currentTabIndex || this.data.is_first_content ? "1" != this.data.currentTabIndex || this.data.is_second_content ? "2" != this.data.currentTabIndex || this.data.is_third_content || (this.setData({
                is_third_content: !0
            }), this.getCommentData()) : this.setData({
                is_second_content: !0,
                second_content: this.data.goodsInfo.has_many_params
            }) : (this.data.is_first_content = !0, this.setData({
                first_content: this.data.goodsInfo.content
            }));
        },
        getCommentData: function() {
            var a = this, e = o.getNetAddresss("goods.comment.get-comment");
            e += "&goods_id=" + this.data.goodsId, e += "&page=" + this.data.commentPage, o._getNetWork({
                showToastIn: !1,
                url: e,
                success: function(e) {
                    var i = e.data;
                    1 == i.result ? (i.data.data.length < 20 && a.setData({
                        noMoreComment: !0
                    }), a.setData({
                        commentPage: a.data.commentPage + 1
                    }), a.data.third_content || a.setData({
                        third_content: []
                    }), a.setData({
                        third_content: [].concat(t(a.data.third_content), t(i.data.data))
                    }), o._isTextEmpty(a.data.third_content) ? (console.log("空没评论"), a.setData({
                        thirKong: !1
                    })) : (console.log("不空"), a.setData({
                        thirKong: !0
                    }))) : a.setData({
                        is_third_content: !1
                    });
                },
                fail: function(t) {
                    a.setData({
                        is_third_content: !1
                    }), console.log(t);
                }
            });
        },
        hidePopView2: function() {
            this.setData({
                popupSpecs2: !1,
                popupModeshow: !0
            });
        },
        gotoindex: function() {
            wx.navigateTo({
                url: "/packageG/index/index"
            });
        },
        postShow: function(t) {
            console.log(t), this.setData({
                posterShow: !0,
                showSahre: !1
            });
        },
        posterClose: function() {
            this.setData({
                posterShow: !1
            });
        },
        timestart: function(t) {
            this.setData({
                timestart: t.timeStamp
            });
        },
        timeend: function(t) {
            this.setData({
                timeend: t.timeStamp
            });
        },
        saveImg: function() {
            wx.getSetting({
                success: function(t) {
                    t.authSetting["scope.writePhotosAlbum"] || wx.authorize({
                        scope: "scope.writePhotosAlbum",
                        success: function() {
                            console.log("授权成功");
                        }
                    });
                }
            });
            var t = this.data.posterImg.image_url;
            wx.downloadFile({
                url: t,
                success: function(t) {
                    console.log(t), wx.saveImageToPhotosAlbum({
                        filePath: t.tempFilePath,
                        success: function(t) {
                            wx.showToast({
                                title: "保存成功",
                                icon: "none",
                                duration: 3e3
                            });
                        },
                        fail: function(t) {
                            console.log(t), "saveImageToPhotosAlbum:fail auth deny" === t.errMsg && (console.log("当初用户拒绝，再次发起授权"), 
                            wx.openSetting({
                                success: function(t) {
                                    t.authSetting["scope.writePhotosAlbum"] ? wx.showToast({
                                        icon: "none",
                                        title: "获取权限成功,再次长按保存图片",
                                        duration: 3e3
                                    }) : wx.showToast({
                                        icon: "none",
                                        title: "获取权限失败,保存图片需要用户授权",
                                        duration: 3e3
                                    });
                                }
                            }));
                        },
                        complete: function(t) {
                            console.log(t);
                        }
                    });
                }
            });
        },
        gotoMember: function() {
            wx.reLaunch({
                url: "/packageG/member_v2/member_v2"
            });
        },
        gopage: function(t) {
            var o = t.currentTarget.dataset.status, a = t.currentTarget.dataset.id, e = t.currentTarget.dataset.backid;
            1 == o ? wx.navigateTo({
                url: "/packageD/directSeeding/livePage/livePage?id=" + a + "&playerType=live"
            }) : 2 == o ? wx.navigateTo({
                url: "/packageD/directSeeding/livePage/livePage?id=" + a + "&playerType=video&backid=" + e
            }) : 3 == o && wx.navigateTo({
                url: "/packageD/directSeeding/foreshow/foreshow?id=" + a
            });
        },
        getLiveList: function() {
            var t = this, a = o.getNetAddresss("goods.goods.get-room");
            o._postNetWork({
                url: a,
                showToastIn: !1,
                data: {
                    page: this.data.page,
                    goods_id: this.data.goodsId
                },
                success: function(o) {
                    var a = o.data;
                    if (1 == a.result) {
                        for (var e = [], i = 0; i < a.data.data.length; ) e.push(a.data.data.slice(i, i + 2)), 
                        i += 2;
                        t.setData({
                            total_page: a.data.last_page,
                            roomdata: e,
                            roomdataBol: !0
                        }), t.data.roomdata.length > 0 && t.setData({
                            tabList: t.data.tabList.concat([ {
                                id: 2,
                                name: "直播间"
                            } ])
                        });
                    } else wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 3e3
                    });
                },
                fail: function(t) {
                    console.log(t.msg);
                }
            });
        },
        _getMoreData: function() {
            var t = this, a = o.getNetAddresss("goods.goods.get-room");
            t.data.isLoadMore = !1, this.data.page >= this.data.total_page || (this.data.page = this.data.page + 1, 
            o._postNetWork({
                url: a,
                showToastIn: !1,
                data: {
                    page: this.data.page,
                    goods_id: this.data.goodsId
                },
                success: function(o) {
                    var a = o.data;
                    1 == a.result ? t.setData({
                        isLoadMore: !0,
                        roomdata: t.data.roomdata.concat(a.data.data)
                    }) : t.setData({
                        page: t.data.page - 1,
                        isLoadMore: !1
                    });
                },
                fail: function(t) {
                    console.log(t.msg);
                }
            }));
        },
        reachBottom: function() {
            this.data.roomdataBol && (this.data.isLoadMore ? this._getMoreData() : console.log("没有更多数据"));
        },
        getManage: function() {
            var t = this, e = this, i = this.selectComponent("#footChild"), s = this.selectComponent("#buyNowChild"), n = o.getNetAddresss("plugin.producer.frontend.goods.getGoodsPage");
            o._postNetWork({
                url: n,
                showToastIn: !1,
                data: {
                    id: this.data.goodsId,
                    producer_id: this.data.producerId,
                    mark: this.data.mark,
                    mark_id: this.data.markId,
                    url: ""
                },
                success: function(o) {
                    var n = o.data;
                    if (1 == n.result) {
                        n.data.wechatcircle_open && 1 == n.data.wechatcircle_open && e.setData({
                            wechatcircle_open: 1
                        }), e.getData(n.data.get_goods), e.setData({
                            broadcast_data: n.data.broadcast_data,
                            favorite: !!n.data.is_favorite && 1 == n.data.is_favorite.status,
                            customer_open: "1" == n.data.customer_open,
                            service_QRcode: n.data.service_QRcode,
                            service_mobile: n.data.service_mobile,
                            freight_pricing: n.data.plugin && n.data.plugin.freight_pricing ? n.data.plugin.freight_pricing : {},
                            producer_info: n.data.producer_info,
                            goodsType: n.data.goods_type.goods_type,
                            goods_info: n.data.get_goods,
                            gooddatas: n.data
                        }), i.setData({
                            goodsInfo: e.data.goods_info,
                            service_QRcode: n.data.service_QRcode,
                            service_mobile: n.data.service_mobile,
                            customer_open: n.data.customer_open
                        }), s.setData({
                            gooddatas: e.data.prop_goods_info.plugin || {}
                        }), n.data.plugin && n.data.plugin.wx_video_link && e.setData({
                            wx_video_link: n.data.plugin.wx_video_link
                        });
                        var d = e.data.freight_pricing.content;
                        try {
                            d && d.indexOf("&#") <= -1 && a.wxParse("Shipping", "html", d, e);
                        } catch (t) {}
                        n.data.get_guidepage_info && e.setData({
                            get_guidepage_info: n.data.get_guidepage_info
                        });
                    } else {
                        wx.showModal({
                            title: "提示",
                            content: n.msg,
                            showCancel: !1,
                            success: function(t) {
                                t.confirm && wx.navigateBack({
                                    delta: 2,
                                    fail: function() {
                                        wx.reLaunch({
                                            url: "/packageG/index/index"
                                        });
                                    }
                                });
                            }
                        }), t.selectComponent("#footChild").setData({
                            isGoods: !1
                        }), e.setData({
                            isGoods: !1
                        });
                    }
                },
                fail: function(t) {
                    console.log(t.msg);
                }
            });
        },
        retailPage: function() {
            var t = this.data.prop_goods_info;
            this.getData(t), this.setData({
                goods_info: t,
                goods_plugin: t.plugin || {},
                gooddatas: t
            });
        },
        getYZSupplier: function() {
            var t = this, a = o.getNetAddresss("plugin.yz-supply.frontend.goods.option");
            o._postNetWork({
                url: a,
                data: {
                    goods_id: this.data.goodsId
                },
                success: function(o) {
                    var a = o.data;
                    if (1 == a.result) {
                        var e = a.data;
                        t.getArrEqual(e, t.data.goodsInfo.has_many_options);
                    }
                }
            });
        },
        getJHSupplier: function() {
            var t = this, a = o.getNetAddresss("plugin.jd-supply.frontend.goods.option");
            o._postNetWork({
                url: a,
                data: {
                    goods_id: this.data.goodsId
                },
                success: function(o) {
                    var a = o.data;
                    if (1 == a.result) {
                        var e = a.data;
                        t.getArrEqual(e, t.data.goodsInfo.has_many_options);
                    }
                }
            });
        },
        getArrEqual: function(t, o) {
            for (var a = 0; a < o.length; a++) 0 == t[o[a].id] && (this.data.goodsInfo.has_many_options[a].stock = 0);
            this.data.goodsInfo.stock = this.data.goodsInfo.has_many_options[0].stock, this.setData({
                goodsInfo: this.data.goodsInfo
            });
        },
        handleMicro: function(t, o, a) {
            for (var e = [], i = 0; i < a.list.length; i++) a.list[i].has_many_image && a.list[i].has_many_image[t] && e.push(a.list[i].has_many_image[t]);
            this.setData({
                min_micro: this.data.min_micro.concat(e)
            }), t < o && this.data.min_micro.length < 12 && (t++, this.handleMicro(t, o, a));
        },
        getGoodsPage: function() {
            var t, e, i, s, n, d, r = this.data.prop_goods_info, c = this.selectComponent("#footChild"), g = this.selectComponent("#buyNowChild");
            if (r.plugin) {
                if (r.plugin.micro_communities) {
                    for (var p = [], l = 0; l < r.plugin.micro_communities.list.length; l++) p.push(r.plugin.micro_communities.list[l].has_many_image.length);
                    var u = Math.max.apply(Math, p);
                    this.handleMicro(0, u - 1, r.plugin.micro_communities);
                    for (var h = [], _ = 0; _ < this.data.min_micro.length; ) h.push(this.data.min_micro.slice(_, _ + 6)), 
                    _ += 6;
                    h.length > 0 && this.data.tabList.push({
                        id: 1,
                        name: "关联微贴"
                    }), this.setData({
                        min_micro: h,
                        tabList: this.data.tabList
                    });
                }
                r.plugin.is_room && 1 == r.plugin.is_room && this.getLiveList(), r.plugin.wechatcircle_open && 1 == r.plugin.wechatcircle_open && this.setData({
                    wechatcircle_open: 1
                }), r.plugin && r.plugin.project_template && (this.data.tabList.push({
                    id: 3,
                    name: "知识库"
                }), this.setData({
                    knowledgeList: r.plugin.project_template.list,
                    tabList: this.data.tabList
                }));
            }
            this.setData({
                broadcast_data: null !== (t = r.plugin) && void 0 !== t && t.broadcast_data ? null === (e = r.plugin) || void 0 === e ? void 0 : e.broadcast_data : [],
                favorite: !!r.is_favorite && 1 == r.is_favorite.status,
                freight_pricing: null !== (i = r.plugin) && void 0 !== i && i.freight_pricing ? null === (s = r.plugin) || void 0 === s ? void 0 : s.freight_pricing : {},
                luck_draw: null !== (n = r.plugin) && void 0 !== n && n.luck_draw ? null === (d = r.plugin) || void 0 === d ? void 0 : d.luck_draw : {},
                goods_plugin: r.plugin || {},
                goods_info: r,
                gooddatas: r
            }), c.setData({
                goods_info: r,
                goodsInfo: r.get_goods,
                service_QRcode: r.customer_service.service_QRcode,
                service_mobile: r.customer_service.service_mobile,
                cservice: r.customer_service.cservice,
                customer_open: r.customer_service.customer_open
            }), g.setData({
                goods_plugin: r.plugin || {}
            }), this.getData(r.get_goods), r.plugin && r.plugin.wx_video_link && this.setData({
                wx_video_link: r.plugin.wx_video_link
            });
            var m = this.data.freight_pricing.content;
            try {
                m && m.indexOf("&#") <= -1 && a.wxParse("Shipping", "html", m, this);
            } catch (t) {
                console.log(t);
            }
            r.plugin && r.plugin.get_guidepage_info && this.setData({
                get_guidepage_info: r.plugin.get_guidepage_info
            }), o._isTextEmpty(r.plugin && r.plugin.lease_toy) || (this.setData({
                isRent: 1 == r.plugin.lease_toy.is_lease,
                isRentBuyShow: 0 != r.plugin.lease_toy.immed_goods_id
            }), o._isTextEmpty(r.plugin.lease_toy.is_rights) || this.setData({
                isRight: 1 == r.plugin.lease_toy.is_rights
            })), r.plugin && r.plugin.selfbuy_discount && this.setData({
                selfbuy_discount: r.plugin.selfbuy_discount
            }), 44 == r.get_goods.plugin_id && this.getJHSupplier(), 120 == r.get_goods.plugin_id && this.getYZSupplier();
        },
        getData: function(t) {
            0 == Number(t.market_price) ? t.notMarket_price = 0 : t.notMarket_price = 1, this.setData({
                goodsInfo: t,
                xqBoxShow: !!t.detail_show
            }), wx.setStorageSync("GoddsShareImg", t.thumb), this.data.goodsInfo.member_discount && (o._isTextEmpty(this.data.goodsInfo.member_discount.discount) ? this.setData({
                openVip: 1
            }) : this.setData({
                openVip: this.data.goodsInfo.member_discount.discount
            })), this.initPopView(), this.setDataByTabIndex();
            var a = this.selectComponent("#footChild");
            a.setData({
                isGoods: !0
            }), this.setData({
                isGoods: !0
            }), o._isTextEmpty(t.has_one_goods_limit_buy) || (this.setData({
                isBuy: 1 == t.has_one_goods_limit_buy.status
            }), a.setData({
                isBuy: 1 == t.has_one_goods_limit_buy.status
            }), this.data.beginTime = t.has_one_goods_limit_buy.start_time, this.data.endTime = 1e3 * t.has_one_goods_limit_buy.end_time, 
            this._timeCompare(this.data.beginTime));
        },
        changeFold: function() {
            var t = !this.data.isfold, o = this.data.freightPricing_main_heigth_var, a = this;
            this.data.isfold ? this.setData({
                freightPricing_main_heigth: 80,
                isfold: t
            }) : o ? this.setData({
                freightPricing_main_heigth: o,
                isfold: t
            }) : this.createSelectorQuery().select(".freightPricing_main_heigth").boundingClientRect(function(e) {
                o = e.height, a.setData({
                    freightPricing_main_heigth_var: 2 * o,
                    freightPricing_main_heigth: 2 * o,
                    isfold: t
                });
            }).exec();
        },
        getVideoLink: function() {
            wx.showLoading({
                title: "正在生成中..."
            });
            var t = this, a = o.getNetAddresss("plugin.wx-video-link.frontend.index.index");
            a += "&id=" + this.properties.goodsId, o._getNetWork({
                showToastIn: !1,
                url: a,
                success: function(o) {
                    var a = o.data;
                    1 == a.result ? "" == a.data.article_url || null == a.data.article_url || null == a.data.article_url ? setTimeout(function() {
                        t.getVideoLink();
                    }, 3e3) : (t.setData({
                        article_url: a.data.article_url,
                        showVideoLink: !0,
                        showSahre: !1
                    }), setTimeout(function() {
                        wx.hideLoading();
                    }, 800)) : wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 3e3
                    });
                },
                fail: function(t) {}
            });
        },
        onCopy: function() {
            wx.setClipboardData({
                data: this.data.article_url,
                success: function(t) {
                    wx.showToast({
                        title: "复制成功",
                        icon: "none",
                        duration: 3e3
                    });
                },
                fail: function() {
                    wx.showToast({
                        title: "复制失败",
                        icon: "none",
                        duration: 3e3
                    });
                }
            }), this.setData({
                showVideoLink: !1,
                article_url: ""
            });
        },
        groupGetData: function() {
            var t = this, a = this.selectComponent("#footChild"), e = this.selectComponent("#buyNowChild"), i = o.getNetAddresss("plugin.fight-groups.frontend.controllers.fight-groups-goods.get-goods"), s = this.properties.store_id;
            s && 0 != s && "undefined" != s && (this.setData({
                is_o2o: !0
            }), a.setData({
                is_o2o: !0
            }), i = o.getNetAddresss("plugin.fight-groups.frontend.store.frontend-fight-groups-goods.get-goods"), 
            i += "&store_id=" + s), "ywmGroup" === this.data.goodsType && (i = o.getNetAddresss("plugin.ywm-fight-groups.frontend.controllers.fight-groups-goods.get-goods"), 
            this.data.cid && Number(this.data.cid) > 0 && (i += "&member_open_group_card_id=" + this.data.cid)), 
            "undefined" != this.data.fight_groups && (i += "&fight_groups_goods_id=" + this.data.fight_groups), 
            i += "&id=" + this.data.activityid, o._getNetWork({
                url: i,
                success: function(i) {
                    var s = i.data;
                    if (1 == s.result) {
                        s.data.lottery_desc = s.data.lottery_desc ? s.data.lottery_desc.split("\n") : "", 
                        s.data.goods_info.favorable_rate ? t.setData({
                            thirKong: !0,
                            third_content: s.data.goods_info.get_comment.data
                        }) : t.setData({
                            thirKong: !1,
                            noMoreComment: !0,
                            third_content: []
                        }), t.setData({
                            gooddatas: s.data,
                            goodsInfo: s.data.goods_info,
                            goods_info: s.data.goods_info,
                            group_price: s.data.min_price,
                            popStock: s.data.goods_info.stock,
                            goodsId: s.data.goods_id,
                            end_time: s.data.end_time,
                            start_time: s.data.start_time,
                            is_pearl: s.data.is_pearl,
                            is_integral: s.data.is_integral,
                            member_count: s.data.member_count,
                            present_bout: s.data.present_bout,
                            my_win_count: s.data.my_win_count,
                            activityId: s.data.id
                        }), a.setData({
                            group_price: s.data.min_price,
                            gooddatas: s.data
                        }), e.setData({
                            gooddatas: s.data
                        }), wx.setStorageSync("GoddsShareImg", s.data.goods_info.thumb), o._isTextEmpty(t.data.group_price) && t.setData({
                            group_price: ""
                        }), o._isTextEmpty(s.data.display_team.end_time) || t.setData({
                            end_time_team: s.data.display_team.end_time
                        }), o._isTextEmpty(t.data.end_time) ? t.setData({
                            isendTime: !1
                        }) : t.setData({
                            isendTime: !0
                        }), t.setData({
                            first_content: s.data.goods_info.content
                        });
                        var n = t.data.gooddatas.has_many_level;
                        n.map(function(t, o) {
                            t.bool = 0 == o;
                        }), t.setData({
                            has_many_level: n
                        }), t.initPopView(), t.triggerEvent("parentEvent", [ s.data.title ]);
                    } else wx.showToast({
                        icon: "none",
                        title: s.msg,
                        duration: 3e3
                    });
                }
            });
        },
        showGroupMoreChild: function() {
            !1 !== this.data.gooddatas.join_status || "group_goods" !== this.data.goodsType && "ywmGroup" !== this.data.goodsType ? this.selectComponent("#Tag").showGroupMore() : wx.showToast({
                title: "今日该活动已达到参与次数",
                icon: "none",
                duration: 3e3
            });
        },
        selfShowPop: function(t) {
            var o = t.detail;
            this.selectComponent("#footChild").setData({
                show1: o,
                service_QRcode: this.data.gooddatas.store.service_QRcode,
                service_mobile: this.data.gooddatas.store.service_mobile,
                customer_open: 1,
                cservice: this.data.gooddatas.store.cservice
            });
        },
        grabGroupData: function() {
            var t = this, a = this, e = null, i = this.selectComponent("#Tag");
            e = o.getNetAddresss("plugin.snatch-regiment.api.index.getSnatchData"), e += "&goods_id=" + this.data.goodsId + "&art=goodsDetail", 
            o._getNetWork({
                url: e,
                success: function(o) {
                    var e = o.data;
                    if (1 == e.result) {
                        var s = [], n = e.data.goodsDetail.team;
                        i.setData({
                            teamLis: n
                        });
                        var d = Math.ceil(n.length / 2), r = [];
                        if (n.length > 0) for (var c = 0; c < d; c++) r.push(n.splice(0, 2));
                        s.push(e.data.goodsDetail.goods.thumb), a.setData({
                            gooddatas: e.data.goodsDetail.goods,
                            popStock: e.data.goodsDetail.goods.stock,
                            team: r,
                            third_content: e.data.goodsDetail.comment.data,
                            "gooddatas.thumb": s,
                            "gooddatas.price": e.data.goodsDetail.goods.price_num,
                            first_content: e.data.goodsDetail.goods.content,
                            end_time: 1e3 * e.data.goodsDetail.goods.end_time,
                            start_time: e.data.goodsDetail.goods.start_time,
                            leader_partake: e.data.goodsDetail.leader_partake,
                            leader_not_join_invalid: e.data.goodsDetail.leader_not_join_invalid || 0,
                            activityId: e.data.goodsDetail.goods.activity_id
                        }), a.initPopView(), a._timeCompare(e.data.goodsDetail.goods.start_time), a.setData({
                            goodsInfo: a.data.gooddatas
                        }), t.selectComponent("#buyNowChild").setData({
                            popStock: e.data.goodsDetail.goods.stock,
                            popThumb: t.data.popThumb,
                            popPrice: t.data.popPrice,
                            goodsDescription: t.data.goodsDescription,
                            optionsMaxCount: t.data.optionsMaxCount,
                            activityId: t.data.activityId,
                            skuImages: t.data._optionArr
                        }), wx.setStorageSync("GoddsShareImg", s[0]), a.triggerEvent("parentEvent", [ a.data.gooddatas.title ]);
                        var g = new Date().getTime() / 1e3;
                        a.setData({
                            nowTime: g
                        });
                        for (var p = a.data.team, l = p.length - 1; l >= 0; l--) p[l].end_time <= g && p.splice(l, 1);
                        a.setData({
                            team: p
                        });
                    } else wx.showToast({
                        icon: "none",
                        title: e.msg,
                        duration: 3e3
                    });
                }
            });
        },
        zhpGroupData: function() {
            var t = this, a = null, e = this, i = this.selectComponent("#footChild"), s = this.selectComponent("#buyNowChild");
            a = o.getNetAddresss("plugin.zhp-group-lottery.frontend.goods.get-goods"), a += "&id=" + this.data.goodsId, 
            o._getNetWork({
                url: a,
                success: function(o) {
                    var a = o.data;
                    1 == a.result ? (e.setData({
                        gooddatas: a.data,
                        goodsInfo: a.data.get_goods,
                        goods_info: a.data.get_goods,
                        group_price: a.data.min_price,
                        popStock: a.data.get_goods.stock,
                        goodsId: a.data.goods_id,
                        end_time: a.data.end_time,
                        start_time: a.data.start_time,
                        first_content: a.data.get_goods.content
                    }), e.initPopView(), i.setData({
                        group_price: a.data.min_price,
                        gooddatas: a.data
                    }), s.setData({
                        gooddatas: a.data
                    }), t.triggerEvent("parentEvent", [ "", "" ]), wx.setNavigationBarTitle({
                        title: "拼团活动详情"
                    }), wx.setStorageSync("GoddsShareImg", a.data.get_goods.thumb), wx.hideLoading({
                        success: function(t) {}
                    }), t.triggerEvent("parentEvent", [ a.data.title, a.data.share_content ]), e._timeCompare(a.data.start_time), 
                    t.zhpBroadcast()) : (wx.hideLoading({
                        success: function(t) {}
                    }), wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 3e3
                    }));
                }
            });
        },
        zhpBroadcast: function() {
            var t = this, a = this, e = o.getNetAddresss("plugin.zhp-group-lottery.frontend.goods.get-window-list");
            wx.showLoading({
                title: "加载中"
            }), o._getNetWork({
                url: e,
                data: {
                    activity_id: this.data.activityId
                },
                success: function(o) {
                    var e = o.data;
                    1 == e.result ? (e.data.goodsId = t.data.goodsId, e.data.integral_name = a.data.gooddatas.love_plugin_name, 
                    a.setData({
                        broadcast_data: e.data
                    }), wx.hideLoading({
                        success: function(t) {}
                    })) : (wx.hideLoading({
                        success: function(t) {}
                    }), wx.showToast({
                        icon: "none",
                        title: e.msg,
                        duration: 3e3
                    }));
                }
            });
        },
        groupWorkData: function() {
            var t = this, a = null;
            a = o.getNetAddresss("plugin.group-work.frontend.modules.goods.controllers.detail.index"), 
            a += "&record_id=" + this.properties.activityid, o._getNetWork({
                url: a,
                success: function(o) {
                    var a = o.data;
                    1 == a.result ? (t.setData({
                        gooddatas: a.data,
                        goodsInfo: a.data.goods_info,
                        goods_info: a.data.goods_info,
                        popStock: a.data.stock,
                        goodsId: a.data.goods_id,
                        group_price: a.data.min_price,
                        isendTime: !0,
                        end_time: a.data.end_time,
                        start_time: a.data.start_time,
                        first_content: a.data.goods_info.content,
                        customer_open: "1" == a.data.customer_service.customer_open,
                        service_QRcode: a.data.customer_service.service_QRcode,
                        service_mobile: a.data.customer_service.service_mobile
                    }), t.selectComponent("#footChild").setData({
                        service_QRcode: a.data.customer_service.service_QRcode,
                        service_mobile: a.data.customer_service.service_mobile,
                        cservice: a.data.customer_service.cservice,
                        customer_open: a.data.customer_service.customer_open
                    }), t.initPopView(), wx.setNavigationBarTitle({
                        title: "拼团活动详情"
                    }), wx.setStorageSync("GoddsShareImg", a.data.goods_info.thumb), wx.hideLoading({
                        success: function(t) {}
                    }), t.triggerEvent("parentEvent", [ a.data.share_title, a.data.share_content ]), 
                    t._timeCompare(a.data.start_time)) : (wx.hideLoading({
                        success: function(t) {}
                    }), wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 3e3
                    }));
                }
            });
        },
        pushCart: function(t) {
            var a = t.currentTarget.dataset.item, e = o.getNetAddresss("member.member-cart.store");
            wx.showLoading({
                title: "加载中"
            }), o._getNetWork({
                url: e,
                data: {
                    goods_id: a.goods_id,
                    total: "1",
                    option_id: a.goods_option_id
                },
                success: function(t) {
                    var o = t.data;
                    wx.showToast({
                        icon: "none",
                        title: o.msg,
                        duration: 1500
                    }), wx.hideLoading({
                        success: function(t) {}
                    });
                }
            });
        },
        lawyerChange: function(t) {
            this.setData({
                "lawyerInfo.name": t.detail.name,
                "lawyerInfo.price": t.detail.service_data.amount,
                "lawyerInfo.status": t.detail.status,
                "lawyerInfo.service_day": t.detail.service_data.day,
                "lawyerInfo.service_type": t.detail.service_data.type,
                "lawyerInfo.l_id": t.detail.id,
                "lawyerInfo.l_name": t.detail.status,
                "lawyerInfo.lf_id": t.detail.lf_id,
                "lawyerInfo.lf_name": t.detail.lawyer_firm.name,
                "lawyerInfo.lf_province_name": t.detail.lawyer_firm.province_name,
                "lawyerInfo.lf_city_name": t.detail.lawyer_firm.city_name,
                "lawyerInfo.lf_area_name": t.detail.lawyer_firm.area_name,
                "lawyerInfo.lf_street_name": t.detail.lawyer_firm.street_name,
                "lawyerInfo.lf_address_detail": t.detail.lawyer_firm.address_detail
            });
        },
        _playLawyer: function() {
            var t = this;
            if (console.log("------"), !this.data.lawyerInfo.name) return this.$toast("请选择律师");
            if (console.log(this.data.lawyerInfo), "tel" == this.data.lawyerInfo.service_type && 0 == this.data.lawyerInfo.status) return this.$toast("该律师已休息，暂不能购买电话咨询服务");
            var a = this.data.lawyerInfo, e = a.l_id, i = a.price, s = a.service_type, n = a.l_name, d = a.lf_id, r = a.lf_name, c = a.service_day, g = a.lf_province_name, p = a.lf_city_name, l = a.lf_area_name, u = a.lf_street_name, h = a.lf_address_detail, _ = {
                goods_id: this.data.goodsId,
                l_id: e,
                price: i,
                service_type: "tel" == s ? 1 : 2,
                l_name: n,
                lf_id: d,
                lf_name: r,
                lf_province_name: g,
                lf_city_name: p,
                lf_area_name: l,
                lf_street_name: u,
                lf_address_detail: h
            };
            c && (_.service_day = c), o._postNetWork({
                url: o.getNetAddresss("plugin.lawyer-platform.frontend.controllers.create"),
                data: _,
                success: function(o) {
                    if (console.log(o), 1 == o.data.result) {
                        var a = o.data.data.order_ids;
                        wx.navigateTo({
                            url: "/packageD/buy/orderPay/orderPay?order_id=" + a
                        });
                    } else t.$toast(o.data.msg);
                }
            });
        }
    }
});